//using System;
//using System.IO;
//using System.Collections.Generic;
//using System.ComponentModel;
//using System.Data;
//using System.Drawing;
//using System.Text;
//using System.Windows.Forms;

//namespace Weazel.Toad.Application.Forms
//{
//  public partial class SetupMicroblazeSimulationForm 
//    : Weazel.Toad.Application.Forms.DialogBaseForm
//  {
//    //private MicroblazeCosimulationSettings settings;
//    //public MicroblazeCosimulationSettings Settings
//    //{
//    //  get { return settings; }
//    //  set { settings = value; }
//    //}

//    private string programImageFile;

//    public SetupMicroblazeSimulationForm()
//    {
//      InitializeComponent();
//    }

//    protected override void OnLoad(EventArgs e)
//    {
//      if (settings != null)
//      {
//        this.programImageFileNameTextBox.Text = settings.LastProgramImageName;
//      }

//      base.OnLoad(e);
//    }

//    protected override void OnClosing(CancelEventArgs e)
//    {
//      if (DialogResult == DialogResult.OK)
//      {
//        if (settings == null)
//          settings = new MicroblazeCosimulationSettings();

//        if (!File.Exists(programImageFile))
//        {
//          MessageBox.Show(String.Format("File '{0}' does not exist", programImageFile));
//          e.Cancel = true;
//        }

//        settings.LastProgramImageName = programImageFile;
//      }
//    }

//    private void button1_Click(object sender, EventArgs e)
//    {
//      OpenFileDialog dialog = new OpenFileDialog();
//      dialog.Title = "Open ELF file";
//      dialog.Filter = "elf files (*.elf)|*.elf|All files (*.*)|*.*";

//      if (dialog.ShowDialog() == DialogResult.OK)
//      {
//        this.programImageFile = dialog.FileName;
//        this.programImageFileNameTextBox.Text = dialog.FileName;
//      }
//    }
//  }
//}

